package com.nbsaas.boot.user.data.entity;

import com.nbsaas.boot.code.annotation.*;
import com.nbsaas.boot.jpa.data.entity.AbstractEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Data;
import org.hibernate.annotations.Comment;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 签到统计实体类
 * 
 * @author 系统生成
 */
@CreateByUser
@ComposeView
@Data
@FormAnnotation(title = "签到统计", model = "签到统计")
@Entity
@Table(name = "bs_sign_in_statistics")
@Comment("签到统计表")
public class SignInStatistics extends AbstractEntity {

    @Comment("用户ID")
    @SearchItem(name = "userId", key = "userId", label = "用户ID")
    @FormField(title = "用户ID", sortNum = "1", grid = true, required = true)
    @Column(name = "user_id", nullable = false)
    private Long userId;

    @Comment("统计年份")
    @FormField(title = "统计年份", sortNum = "2", grid = true, required = true)
    @Column(name = "stat_year", nullable = false)
    private Integer statYear;

    @Comment("统计月份")
    @FormField(title = "统计月份", sortNum = "3", grid = true)
    @Column(name = "stat_month")
    private Integer statMonth;

    @Comment("总签到天数")
    @FormField(title = "总签到天数", sortNum = "4", grid = true, type = InputType.el_input_number)
    @Column(name = "total_sign_days")
    private Integer totalSignDays;

    @Comment("连续签到天数")
    @FormField(title = "连续签到天数", sortNum = "5", grid = true, type = InputType.el_input_number)
    @Column(name = "continuous_sign_days")
    private Integer continuousSignDays;

    @Comment("最大连续签到天数")
    @FormField(title = "最大连续签到天数", sortNum = "6", grid = true, type = InputType.el_input_number)
    @Column(name = "max_continuous_days")
    private Integer maxContinuousDays;

    @Comment("总获得积分")
    @FormField(title = "总获得积分", sortNum = "7", grid = true, type = InputType.el_input_number)
    @Column(name = "total_points", precision = 10, scale = 0)
    private Integer totalPoints;

    @Comment("总获得金额")
    @FormField(title = "总获得金额", sortNum = "8", grid = true, type = InputType.el_input_number)
    @Column(name = "total_amount", precision = 10, scale = 2)
    private BigDecimal totalAmount;

    @Comment("本月签到天数")
    @FormField(title = "本月签到天数", sortNum = "9", grid = true, type = InputType.el_input_number)
    @Column(name = "month_sign_days")
    private Integer monthSignDays;

    @Comment("本月获得积分")
    @FormField(title = "本月获得积分", sortNum = "10", grid = true, type = InputType.el_input_number)
    @Column(name = "month_points", precision = 10, scale = 0)
    private Integer monthPoints;

    @Comment("本月获得金额")
    @FormField(title = "本月获得金额", sortNum = "11", grid = true, type = InputType.el_input_number)
    @Column(name = "month_amount", precision = 10, scale = 2)
    private BigDecimal monthAmount;

    @Comment("最后签到日期")
    @FormField(title = "最后签到日期", sortNum = "12", type = InputType.date, grid = true)
    @Column(name = "last_sign_date")
    private Date lastSignDate;

    @Comment("最后签到时间")
    @FormField(title = "最后签到时间", sortNum = "13", type = InputType.date, grid = true)
    @Column(name = "last_sign_time")
    private Date lastSignTime;

    @Comment("补签次数")
    @FormField(title = "补签次数", sortNum = "14", grid = true, type = InputType.el_input_number)
    @Column(name = "makeup_count")
    private Integer makeupCount;

    @Comment("统计更新时间")
    @FormField(title = "统计更新时间", sortNum = "15", type = InputType.date, grid = true)
    @Column(name = "stat_update_time")
    private Date statUpdateTime;
} 